package com.liwen.api.enums;


public enum Ins {
    BD(49, "BD", "百度", "CF_BD"),
    ANT(50, "ANT", "蚂蚁金服", "CF_MAYI_JIEBEI"),
    JD(51, "JD", "京东", "CF_JD"),;
    private int code;
    private String name;
    private String desc;
    private String busType;

    Ins(int code, String name, String desc, String busType) {
        this.code = code;
        this.name = name;
        this.desc = desc;
        this.busType = busType;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }

    public String getBusType() {
        return busType;
    }

    public static Ins get(int id) {
        if (107 == id) {
            return Ins.JD;
        }
        for (Ins ins : Ins.values()) {
            if (ins.getCode() == id)
                return ins;
        }
        return null;
    }
}
